package org.example.controller.article;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.example.common.JsonResult;
import org.example.dto.wechat.GetBatchgetMaterialParamsDTO;
import org.example.entity.article.ArticleEntity;
import org.example.service.article.ArticleService;
import org.example.service.utils.IConst;
import org.example.service.utils.PageUtils;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

import static org.example.service.utils.IConst.API_BASE;

@RestController
@RequestMapping(API_BASE+"article")
@Api(tags = IConst.MODULE_ARTICLE)

public class WechatArticleController {
    @Resource
    private ArticleService articleService;

    @GetMapping("/list")
    @ApiOperation(value = "文章攻略分页查询", tags = IConst.MODULE_ARTICLE)
    public JsonResult<PageUtils<ArticleEntity>> list(GetBatchgetMaterialParamsDTO paramsDTO){
        PageUtils<ArticleEntity> pageUtils=articleService.getBatchgetMaterial(paramsDTO);
        return JsonResult.ok(pageUtils);
    }

}
